Deployed multithreaded applications can contain many races because these applications are difficult to write, test, and debug. These races include data races, atomicity violations, order violations, and any other concurrency errors. They can cause application crashes and data corruptions. Worse, the number of deployed races may drastically increase due to the popularity of multicore and the immaturity of race detectors.
To address such races, software updates are typically employed. A problem with such updates, however, is that they typically require an application restart, and thus are at odds with high availability demand. Live update systems are also used to address races. Such systems allow a user to avoid a restart by adapting conventional patches into hot patches and applying them to live applications or kernels.
However, a reliance on conventional patches can have two problems. First, due to the complexity of multithreaded applications, race-fix patches can be unsafe and introduce new errors such as new races or deadlocks. Safety is crucial for encouraging users to adopt live updates and install fixes early, yet automatically ensuring safety is difficult because conventional patches are created from general, difficult-to-analyze languages. Second, even if the root cause of a race is reasonably clear, producing a good patch for the race can still take time, leaving buggy applications unprotected before the patch is ready. Many factors contribute to the delays. At a minimum level, a public software release demands time-consuming code review and testing, which contribute to the delays between fix and release. Moreover, despite the many available options for fixing a race (e.g., lock-free flags, fine-grained locks, and coarse-grained locks), conventional patches often have to be reasonably efficient for source maintainers to accept them, contributing to the delays between diagnosis and fix. Performance pressure is perhaps why many races have not been fixed by adding locks, and why some have taken years to correctly fix.